package com.magic;

import com.magic.dto.StudentDto;
import com.magic.mapstruct.StudentListConvert;
import com.magic.vo.StudentVo;

import java.util.Arrays;
import java.util.List;

/**
 * @author mzk
 * @Description
 * @create 2021-08-25 13:09
 */
public class Main {
    public static void main(String[] args) {
        StudentDto dto = new StudentDto("22", "张三");
        StudentDto dto2 = new StudentDto("221", "张三1");
        List<StudentDto> studentDtos = Arrays.asList(dto, dto2);
        System.out.println("dto = " + dto);
        StudentVo studentVo = StudentListConvert.INSTANCE.vo2Dto(dto);
        System.out.println("studentVo = " + studentVo);
        System.out.println("studentDtos = " + studentDtos);
        List<StudentVo> studentVos = StudentListConvert.INSTANCE.vos2Dtos(studentDtos);
        System.out.println("studentVos = " + studentVos);

    }
}
